from ui.components.composite.nav_view_widget import NavViewWidget
from ui.components.inputs.label import TgLabel
from .stock_index_widget import StockIndexWidget


class SlackingOffWidget(NavViewWidget):
    def __init__(self):
        super().__init__()

        # Add pages to the view
        self.stock_index_page = StockIndexWidget()
        self.history_page = TgLabel("历史交易页面 - 敬请期待")

        self.add_item(self.stock_index_page, "股指")
        self.add_item(self.history_page, "历史交易")

    def cleanup(self):
        """清理资源"""
        if hasattr(self, 'stock_index_page'):
            self.stock_index_page.cleanup()